package com.lianxi;

/**
 * @program: fanxing
 * @description:
 * @author: 诸葛龙辰
 * @create: 2022-10-25 19:41
 **/
public class Test {
    public static void main(String[] args) {
        Info<String> objectInfo = new Info<>();
        objectInfo.setBane("zhao");
        System.out.println(objectInfo);
        Info<Integer> objectInfo1 = new Info<>();
        objectInfo1.setBane(6666);
        System.out.println(objectInfo1);
        Info<Character> objectInfo2 = new Info<>();
        objectInfo2.setBane('o');
        System.out.println(objectInfo2);
    }
    public static  void fun(Info<? extends Number> info){
        info.show();
    }
    public static void fun01(Info<? super String> info){
        info.show();
    }
}
class Info<T>{
    private T bane;
    public void show(){
        System.out.println("bane======="+bane);
    }
    public T getBane() {
        return bane;
    }

    public void setBane(T bane) {
        this.bane = bane;
    }

    @Override
    public String toString() {
        return "Info{" +
                "bane=" + bane +
                '}';
    }
}
